home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- global proc mayaSoftwareSetCommonGlobalValue(
- string $global,
- string $value)
- {
- //
- // Description:
- // This procedure is called when the current renderer has changed from
- // some other renderer to the Maya Software renderer. It is called in the
- // process of copying common global values from the previous renderer to
- // the Maya Software renderer.
- // This procedure sets the value of the global specified by $global to the
- // value specified by $value.
- // For a complete list of valid values for the $global argument, and to
- // see how this procedure is used, see copyCommonRenderGlobals.mel.
- //
-
- int $intValue;
- float $floatValue;
-
- switch ($global)
- {
- case "fileNamePrefix":
- setAttr -type "string" defaultRenderGlobals.imageFilePrefix $value;
- break;
- case "animation":
- $intValue = $value;
- setAttr defaultRenderGlobals.animation $intValue;
- break;
- case "startFrame":
- $floatValue = $value;
- setAttr defaultRenderGlobals.startFrame $floatValue;
- break;
- case "endFrame":
- $floatValue = $value;
- setAttr defaultRenderGlobals.endFrame $floatValue;
- break;
- case "byFrame":
- $floatValue = $value;
- setAttr defaultRenderGlobals.byFrameStep $floatValue;
- break;
- case "framePadding":
- $intValue = $value;
- setAttr defaultRenderGlobals.extensionPadding $intValue;
- break;
- case "renderableObjects":
- if ($value == "all")
- {
- setAttr defaultRenderGlobals.renderAll 1;
- }
- else if ($value == "selected")
- {
- setAttr defaultRenderGlobals.renderAll 0;
- }
- break;
- case "useCustomExtension":
- if ($value == "1")
- {
- setAttr defaultRenderGlobals.outFormatControl 2;
- }
- else
- {
- setAttr defaultRenderGlobals.outFormatControl 0;
- }
- break;
- case "customExtension":
- setAttr -type "string" defaultRenderGlobals.outFormatExt $value;
- break;
- case "renumberFramesUsing":
- $intValue = $value;
- setAttr defaultRenderGlobals.modifyExtension $intValue;
- break;
- case "renumberStartFrame":
- $floatValue = $value;
- setAttr defaultRenderGlobals.startExtension $floatValue;
- break;
- case "renumberByFrame":
- $floatValue = $value;
- setAttr defaultRenderGlobals.byExtension $floatValue;
- break;
- case "maintainWidthHeightRatio":
- $intValue = $value;
- setAttr defaultResolution.aspectLock $intValue;
- break;
- case "width":
- $intValue = $value;
- setAttr defaultResolution.width $intValue;
- break;
- case "height":
- $intValue = $value;
- setAttr defaultResolution.height $intValue;
- break;
- case "lockDeviceAspectRatio":
- $intValue = $value;
- setAttr defaultResolution.lockDeviceAspectRatio $intValue;
- break;
- case "deviceAspectRatio":
- $floatValue = $value;
- setAttr defaultResolution.deviceAspectRatio $floatValue;
- break;
- case "pixelAspectRatio":
- //
- // We do not store pixel aspect ratio. Only device aspect
- // ratio is stored.
- //
- break;
- case "enableDefaultLight":
- $intValue = $value;
- setAttr defaultRenderGlobals.enableDefaultLight $intValue;
- break;
- case "pluginFormat":
- setAttr -type "string" defaultRenderGlobals.pluginFormat $value;
- break;
- case "preRenderMel":
- if(!`about -evalVersion`)
- setAttr -type "string" defaultRenderGlobals.preRenderMel $value;
- break;
- case "postRenderMel":
- if(!`about -evalVersion`)
- setAttr -type "string" defaultRenderGlobals.postRenderMel $value;
- break;
- }
- }
-